Fix cargo test --doc with dev-deps
authorAlex Crichton <alex@alexcrichton.com>
Tue, 20 Dec 2016 00:28:06 +0000 (16:28 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Thu, 5 Jan 2017 17:34:57 +0000 (09:34 -0800)
commitfb1736ef2b427a1ea2cd69c12b401a540ae7dbd1
treeb41d772e960e14bfef06c11e3b0ed7f99db320e6
parent154a30b4c8b129ecf4646a7bebbab5ff9a6bbffc
Fix cargo test --doc with dev-deps

Previously Cargo accidentally didn't pull in dev-dependencies due to the way
`cargo test --doc` was interpreted in terms of top-level targets. This PR
special cases this situation by ensuring that the doctest intention makes its
way all to the backend and the dependencies can be correctly calculated.

Closes #3422
src/bin/test.rs
src/cargo/core/manifest.rs
src/cargo/core/workspace.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/job_queue.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/util/toml.rs
tests/test.rs